<template>
  <el-card :body-style="{ padding: '0px' }">
    <div style="width: 110%; height: 300px" ref="bar"></div>
  </el-card>
</template>

<script>
import * as echarts from "echarts";
export default {
  mounted() {
    var myChart = echarts.init(this.$refs.bar);
    var option;
    option = {
      title: {
        text: "万/人",
      },
      tooltip: {
        trigger: "axis",
      },
      legend: {},
      xAxis: {
        type: "category",
        data: [
          "2020.6",
          "2020.7",
          "2020.8",
          "2020.9",
          "2020.10",
          "2020.11",
          "2020.12",
        ],
      },
      yAxis: {
        type: "value",
      },
      series: [
        {
          name: "新增用户",
          data: [0.2, 0.6, 2, 0.3, 0.1, 0.1, 0.5],
          type: "bar",
        },
        {
          name: "活跃用户",
          data: [12, 6, 7, 6, 8, 10, 3],
          type: "bar",
        },
      ],
    };

    option && myChart.setOption(option);
  },
};
</script>

<style lang='less' scoped>
</style>